
function RestoreCameraDefault(a)
{
	printf('IN PROGRESS ****** ');
	flashpoint();

	return;
	
	
	printf('# RestoreCameraDefault()');
	printf('# restore user default to  current/factory setting');
	printf('# READ only tags  are noted ');
	printf(' ');
	writeMenu('"RestoreCameraDefault"','"CMD"','"RestoreCameraDefault()"');
	writeVariables();
	printf('declare s: title ');
	
	printf('<br>','#**** OPEN FILE ****');
  	printf('outFile="/System/ZRCDef.txt"');
	writeFileOpen();

		printf('count=1');
		printf('LOOP:');
		printf('theType="UInt"');
		printf('fposComm=" "');
		
		for( i=1 ; i< a.length ; i++)
		{ 			
 	 			printf(" ");
 				printf('if count == ', i );
  	 			printf('param=',a[i].param);
  	 			
  	 			
  	 			if( a[i].fposComm == "GetProductInfo")
  	 				printf('fposComm = "GetProductInfo"');
  	 				
  	 			// write theType									
 				if( a[i].type == "String" || a[i].type=="DosName")
 					printf('theType="String"');
 				else if( a[i].type=="SInt" )
 					printf('theType="SInt"'); 					
 				else if( (a[i].type=="Enum List Hex") || (a[i].type=="Hex") || (a[i].type=="Fixed")  || (a[i].type=="BitMask"))
 					printf('theType="Hex"'); 					
 				
  	 			printf('title="',a[i].desc,'"');
 				printf('end '); 			

				
		}// end of this HUGE for loop
		printf(' ');

// start to examine RestoreCameraDefault()
	printf('Wait(100)');
	printf(' ');
	
	printf('WriteLine(fd," ")' );
	printf('WriteLine(fd,"**** ",title," ****" )' );
	
	printf("# skip a GetProductInfo call **********************");
	printf(' if fposComm == "GetProductInfo"');
	printf(' WriteLine(fd,count,")",param," READ only (GetProductInfo call) ")');
	printf(' goto CONTINUE');	
	printf(' end ');
	printf("# *************************************************");
	printf(' ');

 	printf(' if theType=="SInt"');
 	printf(' goto case_SINT');
 	printf(' end','<br>');

 	printf(' if theType=="String"');
 	printf(' goto case_STRING');
 	printf(' end','<br>');
	
	printf(' ' );
	printf('CASE_UINT:');
	// set user default to current state
	
	printf('# get from factory then user default ');
	printf('status=GetCameraDefault(0,param,ufactory)' );
	printf('status1=GetCameraDefault(1,param,uuser)' );

	printf('if theType != "Hex" ');
	printf('DisplayLine(count,")",param,"[",status,"][",status1,"] ", ufactory,",", uuser )' );
	printf('Write(fd,count,")",param,"[",status,"][",status1,"] ")' );
	printf('WriteLine(fd,ufactory," (factory)  ",uuser," (user)" )' );	
	printf('end','<br>');
	
	printf('if theType == "Hex" ');
	printf('bfactory=ufactory');
	printf('buser=uuser');
	printf('DisplayLine(count,")",param,"[",status,"][",status1,"] " , bfactory,",", buser )' );
	printf('Write(fd,count,") ",param,"[",status,"][",status1,"] ")' );
	printf('WriteLine(fd,bfactory," (factory)  ",buser," (user)" )' );	
	printf('end','<br>');
	
	printf('goto CONTINUE');
	printf('# UINT finished  **************************************************');		

	printf('case_SINT:');
	printf('# get from factory then user default ');

	printf('status=GetCameraDefault(0,param,ifactory)' );
	printf('status1=GetCameraDefault(1,param,iuser)' );
	printf('DisplayLine(count,")",param,"[",status,"][",status1,"] ", ifactory,",", iuser )' );
	printf('Write(fd,count,")",param,"[",status,"][",status1,"] ")' );
	printf('WriteLine(fd,ifactory," (factory)  ",iuser," (user)" )' );	
	printf('<br>');

	printf('goto CONTINUE');

	printf('# SINT finished  ***************************************************');		

	printf('case_STRING:');	
	printf('# get from factory then user default ');

	printf('status=GetCameraDefault(0,param,sfactory)' );
	printf('status1=GetCameraDefault(1,param,suser)' );
	printf('DisplayLine(count,")",param,"[",status,"][",status1,"] ", sfactory,",", suser )' );
	printf('Write(fd,count,")",param,"[",status,"][",status1,"] ")' );
	printf('WriteLine(fd,sfactory," (factory)  ",suser," (user)" )' );	
	printf('<br>');
		
	printf('# STRING finished  ************************************************');		
	

	
	printf('CONTINUE:');
	printf('if count<', a.length-1 );
	printf('count=count+1 ');
	printf('goto LOOP');
	printf('end');


}
